<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp"%>
<script type="text/javascript">
	$(function() {

		$('#familyInfoEditForm').form({

			url : '${path }/familyInfo/edit',
			onSubmit : function() {
				progressLoad();
				var isValid = $(this).form('validate');
				if (!isValid) {
					progressClose();
				}
				return isValid;
			},
			success : function(result) {
				progressClose();
				result = $.parseJSON(result);
				if (result.success) {
					parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为user.jsp页面预定义好了
					parent.$.modalDialog.handler.dialog('close');
				} else {
					var form = $('#familyInfoEditForm');
					parent.$.messager.alert('错误', eval(result.msg), 'error');
				}

			}
		});

	});
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
	<div data-options="region:'center',border:false" title=""
		style="overflow: hidden; padding: 3px;">
		<form id="familyInfoEditForm" method="post">
			<table class="grid">

				<tr>
					<td>成员编号</td>
					<input name="id" type="hidden" value="${familyInfo.id}">
					<td><input name="familyInfoNo" type="text" placeholder="成员编号"
						"class="easyui-validatebox" data-options="required:true"
						value="${familyInfo.familyInfoNo}"></td>
				</tr>
				<tr>
					<td>家庭编号</td>
					<td><input name="familyNo" type="text" placeholder="请输入家庭编号"
						"class="easyui-validatebox" data-options="required:true"
						value="${familyInfo.familyNo}"></td>
				</tr>
				<tr>
					<td>身份证号</td>
					<td><input name="cardNo" type="text"
						value="${familyInfo.cardNo}" placeholder="请输入身份证号"
						class="easyui-validatebox" data-options="required:true"></td>
				</tr>

				<tr>
					<td>姓名</td>
					<td><input name="name" type="text" placeholder="请输入姓名"
						"class="easyui-validatebox" data-options="required:true" value="${familyInfo.name}"></td>
				</tr>
				<tr>
					<td>性别</td>
					<td><input name="gender" type="text" placeholder="请输入性别"
						"class="easyui-validatebox" data-options="required:true" value="${familyInfo.gender}"></td>
				</tr>
				<tr>
					<td>年齡</td>
					<td><input name="age" type="text" placeholder="请输入年龄"
						"class="easyui-validatebox" data-options="required:true" value="${familyInfo.age}"></td>
				</tr>
				<tr>
					<td>家庭住址</td>
					<td><input name="address" type="text" placeholder="请输入家庭地址"
						"class="easyui-validatebox" data-options="required:true" value="${familyInfo.address}"></td>
				</tr>
				<tr>
					<td>联系方式</td>
					<td><input name="contact" type="text" placeholder="请输入联系方式"
						"class="easyui-validatebox" data-options="required:true" value="${familyInfo.contact}"></td>
				</tr>
				<tr>
					<td>与户主关系</td>
					<td><input name="relaType" type="text" placeholder="请输入与户主关系"
						"class="easyui-validatebox" data-options="required:true" value="${familyInfo.relaType}"></td>
				</tr>
			</table>
		</form>
	</div>
</div>
